package com.tangsm.spring.boot.event.publisher.listener;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * spring boot 事件发布订阅实例
 *
 * @author tangsm
 * @see <a href="https://blog.csdn.net/qq_28060549/article/details/81073001">参考：ApplicationEventPublisherAware事件发布详解</a>
 */
@RestController
@SpringBootApplication
public class EventPublisherListenerApplication {

    public static void main(String[] args) {
        SpringApplication.run(EventPublisherListenerApplication.class, args);
    }

    /**
     * 默认接口
     *
     * @return 结果
     */
    @GetMapping("/")
    public String index() {
        return "ok";
    }
}
